<link rel="stylesheet" href="__CSS__/geocaching.css">
<div class="breadcrumbs" id="breadcrumbs">
    <!--导航路径列表-->
    <ul class="breadcrumb no-margin-left">
        <li>
            <a>藏宝前台</a>
        </li>
        <li class="action">
            会长管理
        </li>
    </ul>
</div>
<div class="page-content">
    <div class="nav-tab" style="position: relative">
        <ul class="nav-tab-title ">
            <li class="nav-this">会长列表</li>
        </ul>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <form class="form-horizontal s_input-bgcolor pad-t20" method="post" action="/admin/treasure/leaderList">
                <div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 pad-b20">
                    <div class="form-group">
                        <label class="col-sm-3 control-label text-right no-padding-right" for="form-field-2-2">会长用户名: </label>
                        <div class="col-sm-8">
                            <input type="text" id="form-field-2-2" name="uname" value="{$postArr.uname}" placeholder="请输入会长用户名" class="form-control  back-linegtgray7">
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 pad-b20">
                    <div class="form-group">
                        <label class="col-sm-3 control-label text-right no-padding-right" for="form-field-1-2">会长姓名:</label>

                        <div class="col-sm-8">
                            <input type="text"  placeholder="请输入会长姓名" name="tname" value="{$postArr.tname}" class="form-control  back-linegtgray7">
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 col-sm-6 col-xs-6 pad-b20">
                    <div class="form-group">
                        <label class="col-sm-3 control-label text-right no-padding-right " for="form-field-3-3">申请时间: </label>
                        <div class="col-sm-8">
                            <div class="input-daterange input-group">
                                <input type="text" class="input-sm form-control  back-linegtgray7" placeholder="开始时间" name="start" value="{$postArr.start}" id="start" >
                                <span class="input-group-addon" style="background: none;border: none;"> - </span>
                                <input type="text" class="input-sm form-control  back-linegtgray7" placeholder="结束时间" name="end" value="{$postArr.end}" id="end">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20 text-right">
                    <button class="btn back-linghtgreend" type="button" onclick="addTreasure()" style="width: 120px;border-radius: 2rem;border-color:#37c724;margin-left: 20px;">添加</button>
                    <button class="btn " style="width: 120px;    border-radius: 2rem; background: #fba40a!important;border-color: #fba40a;margin-left: 20px;">查询</button>
                </div>
            </form>
            <div class="space"></div>
            <div class="row">
                <div class="col-xs-12">
                    <table id="sample-table-1"
                           class="table table-hover">
                        <thead>
                        <tr class="back-linegtgray7">
                            <th class="center">会长用户名</th>
                            <th class="center">会长姓名</th>
                            <th class="center">个人业绩</th>
                            <th class="center">团队业绩</th>
                            <th class="center">团队人数</th>
                            <th class="center">审核人</th>
                            <th class="center">申请时间</th>
                        </tr>
                        </thead>

                        <tbody>
                        {empty name="resList"}
                            <tr class="s_tr-vertical">
                                <td colspan="7" class="center" style="color: red;">没有查询到结果</td>
                            </tr>
                        {/empty}
                        {volist name="resList" id="vo"}
                            <tr class="s_tr-vertical">
                                <td class="center">{$uRes[$vo[CustomerId]][uname]}</td>
                                <td class="center">{$uRes[$vo[CustomerId]][tname]}</td>
                                <td class="center">{$vo.PersonalTreasure}</td>
                                <td class="center" >{$vo.TeamTreasure}</td>
                                <td class="center">{$vo.TeamNum}</td>
                                <td class="center s_order-complete">{$cuRes[$vo[SecondApproveId]]|default='admin'}</td>
                                <td class="center">{$vo.CreatedOn}</td>
                            </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
                <!-- /.span -->
            </div>
        </div>
    </div>
    <div class="text-center">
        {$pageShow}
    </div>
</div>

<div id="addtreasure" style="width: 100%;height: 100%;position: fixed;left: 0;top: 0;z-index: 9000000;display: none">
    <span style="width: 100%;height: 100%;position: absolute;left: 0;top: 0;background: rgba(0,0,0,0.4)"></span>
    <iframe src="/admin/treasure/leaderAdd" frameborder="0" style="width:1000px;height:700px;position: absolute;left: 50%;top: 50%;margin-left:-451px;margin-top:-336px;background: #fff;z-index: 1;"></iframe>
</div>
<script src="__JS__/laydate.js"></script>
<script>
    laydate.render({
        elem: '#start' //指定元素
    });
    laydate.render({
        elem: '#end' //指定元素
    });
    function addTreasure() {
        $('#addtreasure').show();
    }
    function closeDialog() {
        $('#addtreasure').hide();
    }
    function setLeader(uid) {
        $.post('/admin/treasure/leaderAdd',{setLeaderId:uid},function(data) {
            $('#addtreasure').hide();
            location.href = '/admin/treasure/leaderList';
        });
    }
</script>

